package com.snopy.concurrency.methodstack;

/**
 * @author snopy
 * @version 1.0.0
 * @classname NumOperator
 * @description
 * @email 77912204@qq.com
 * @date 2022/06/23 18:24
 */
public class NumOperator {
    private static int num;
    public synchronized static void incre(){
        num++;
    }

    public synchronized static void deincre(){
        num--;
    }

    public synchronized int getNum() {
        return num;
    }
}
